package com.comleader.operator.core.handler;

import java.time.LocalDateTime;

import com.comleader.operator.pojo.entity.BaseEntity;
import com.mybatisflex.annotation.InsertListener;

/**
 * @Dscription 插入、更新字段填充
 * @Author 连新景
 * @Date 2024/07/09 16:25
 */
public class EntityInsertListener implements InsertListener {

    @Override
    public void onInsert(Object entity) {
        BaseEntity baseEntity = (BaseEntity)entity;
        baseEntity.setCreateTime(LocalDateTime.now());
    }

}
